﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterPage/admin/SAClient.master"
    AutoEventWireup="true" CodeFile="MainFrm.aspx.cs" Inherits="SAClientWeb_MainFrm" %>

<%@ MasterType VirtualPath="~/masterPage/admin/SAClient.master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript">
        function containerMouseover(sender) {
         //   sender.getElementsByTagName("div")[0].style.display = "";
        }
        function containerMouseout(sender) {
           // sender.getElementsByTagName("div")[0].style.display = "none";
        }
    </script>
    <telerik:RadWindowManager ID="Singleton" Skin="Outlook" Width="600" Height="530"
        VisibleStatusbar="false" Behaviors="Close,Move, Resize" runat="server" EnableShadow="true">
    </telerik:RadWindowManager>
    <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
        <table>
            <tr>
                <td valign="top" width="280px">
                    <div>
                        <telerik:RadDockZone ID="RadDockZonen" runat="server" MinWidth="280px">
                            <telerik:RadDock ID="RadDockn" runat="server" Title="类别" Width="230px" DefaultCommands="None"
                            BorderStyle="None" CloseText="关闭" CollapseText="收起" ExpandText="展开" DockHandle="None"
                             Collapsed="false" Resizable="true" Pinned="true" EnableDrag="false">
                                <ContentTemplate>
                                    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="1" MultiPageID="RadMultiPage1"
                                        Width="150px">
                                        <Tabs>
                                            <telerik:RadTab runat="server" Text="类别" PageViewID="RadPageView1">
                                            </telerik:RadTab>
                                            <telerik:RadTab runat="server" Text="供应商" PageViewID="RadPageView2" Selected="True">
                                            </telerik:RadTab>
                                        </Tabs>
                                    </telerik:RadTabStrip>
                                    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="1">
                                        <telerik:RadPageView ID="RadPageView1" runat="server">
                                            <telerik:RadDockZone ID="rdzNavigator" runat="server" Height="600px" Width="250px">
                                                <telerik:RadDock ID="rdSearchKey" runat="server" Height="600px" DefaultCommands="ExpandCollapse"
                                                    BorderStyle="None" CloseText="关闭" CollapseText="收起" ExpandText="展开" DockHandle="None"
                                                    Collapsed="false" Resizable="true" Pinned="true" EnableDrag="false">
                                                    <ContentTemplate>
                                                        <telerik:RadTreeView ID="treeView_Category" runat="server" OnNodeClick="treeView_Category_AfterSelect">
                                                        </telerik:RadTreeView>
                                                    </ContentTemplate>
                                                </telerik:RadDock>
                                            </telerik:RadDockZone>
                                        </telerik:RadPageView>
                                        <telerik:RadPageView ID="RadPageView2" runat="server">
                                            <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="600px" Width="250px">
                                                <telerik:RadDock ID="RadDock2" runat="server" Height="600px" DefaultCommands="ExpandCollapse"
                                                    BorderStyle="None" CloseText="关闭" CollapseText="收起" ExpandText="展开" DockHandle="None"
                                                    Collapsed="false" Resizable="true" Pinned="true" EnableDrag="false">
                                                    <ContentTemplate>
                                                        <telerik:RadTreeView ID="treeView_Vendor" runat="server" OnNodeClick="treeView_Vendor_AfterSelect">
                                                            <DataBindings>
                                                                <telerik:RadTreeNodeBinding TextField="Name" ImageUrl="../images/SAClient/favicon.ico" />
                                                            </DataBindings>
                                                        </telerik:RadTreeView>
                                                    </ContentTemplate>
                                                </telerik:RadDock>
                                            </telerik:RadDockZone>
                                        </telerik:RadPageView>
                                    </telerik:RadMultiPage>
                                </ContentTemplate>
                            </telerik:RadDock>
                        </telerik:RadDockZone>
                    </div>
                </td>
                <td valign="top" width="750px">
                    <div>
                        <telerik:RadDockZone ID="RadDockZone3" runat="server">
                            <telerik:RadDock ID="RadDock3" runat="server" Title="零件搜索" CloseText="关闭" CollapseText="收起"
                                DefaultCommands="None" DockMode="Docked" ExpandText="展开" EnableRoundedCorners="true"
                                Collapsed="false" Resizable="false" Pinned="true" EnableDrag="false">
                                <ContentTemplate>
                                    <table>
                                        <tr>
                                            <td>
                                                <telerik:RadTextBox ID="textBox_Search" runat="server" Width="550px">
                                                </telerik:RadTextBox>
                                            </td>
                                            <td>
                                                <asp:Button ID="button_Search" runat="server" Text="查询" Width="100px" OnClick="button_Search_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </telerik:RadDock>
                            <telerik:RadDock ID="RadDock1" runat="server" Title="零件列表" CloseText="关闭" CollapseText="收起"
                                DefaultCommands="None" DockMode="Docked" ExpandText="展开" EnableRoundedCorners="true"
                                Collapsed="false" Resizable="false" Pinned="true" Width="600px" EnableDrag="false">
                                <ContentTemplate>
                                <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1">
                                    <telerik:RadListView runat="server" ID="listView_Families" AllowPaging="true"   AllowSorting="true" OnNeedDataSource="listView_Families_NeedDataSource" 
                                        DataKeyNames="Id" OverrideDataSourceControlSorting="true"  ItemPlaceholderID="Panel1" >
                                       
                                        <LayoutTemplate>
                                         <%--   <div id="list">
                                                <asp:Panel runat="server" ID="Panel1" Style="float: left; margin-left: 160px" Visible="<%#Container.PageCount > 1 %>">
                                                    <asp:Button runat="server" ID="PrevButton" CommandName="Page" CommandArgument="Prev"
                                                        Text="Prev Page" Enabled="<%#Container.CurrentPageIndex > 0 %>" />
                                                    <asp:Button runat="server" ID="NextButton" CommandName="Page" CommandArgument="Next"
                                                        Text="Next Page" Enabled="<%#Container.CurrentPageIndex < Container.PageCount - 1 %>" />
                                                </asp:Panel>
                                              
                                                <div>
                                                
                                                </div>
                                               
                                                <div style="clear: both;">
                                                </div>
                                                <asp:Panel ID="itemPlaceholder" runat="server">
                                                </asp:Panel>
                                                <div style="clear: both;">
                                                </div>
                                            </div>--%>
                                             
                                       <asp:Panel ID="Panel1" runat="server" />
                                            <table cellpadding="0" cellspacing="0" width="100%;" style="clear: both;">
                                                <tr>
                                                    <td>
                                                        <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="listView_Families"
                                                            PageSize="24">
                                                            <Fields>
                                                                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                                                                <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="5" />
                                                                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                                                                <telerik:RadDataPagerPageSizeField PageSizeComboWidth="60" PageSizeText="Page size: " />
                                                               <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                                                                    TextBoxWidth="30" />
                                                                <telerik:RadDataPagerTemplatePageField>
                                                                    <PagerTemplate>
                                                                        <div style="float: right">
                                                                            <b>Items
                                                                                <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                                                to
                                                                                <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                                                                of
                                                                                <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                                                <br />
                                                                            </b>
                                                                        </div>
                                                                    </PagerTemplate>
                                                                </telerik:RadDataPagerTemplatePageField>

                                                            </Fields>
                                                        </telerik:RadDataPager>
                                                    </td>
                                                </tr>
                                            </table>
         
                                            
                                        </LayoutTemplate>
                                        
                                        <ItemTemplate>
                                            <div style="float: left; margin: 5px; padding: 2px; position: relative; background: write;"
                                                class="myClass" onmouseover="containerMouseover(this)" onmouseout="containerMouseout(this)">
                                                <telerik:RadBinaryImage Style="cursor: pointer; display: block;" runat="server" ID="RadBinaryImage1"
                                                    DataValue='<%#Eval("ImageByte") %>' Height='<%#ImageHeight %>' Width="<%#ImageWidth %>"
                                                    ResizeMode="Fit" onclick="<%#CreateWindowScript(Container.DataItem) %>" AlternateText="Click to view larger image"
                                                    ToolTip="Click to view larger image" />
                                                        <asp:Label ID="Label1" runat="server" Text='<%#Bind("Name") %>' CssClass="txt" Width="100px" Height="50px"></asp:Label>

                                            </div>
                                              
                                        </ItemTemplate>
                                        <AlternatingItemTemplate>
                                            <div style="float: left; margin: 5px; padding: 2px; position: relative; background: write;"
                                                class="myClass" onmouseover="containerMouseover(this)" onmouseout="containerMouseout(this)">
                                                <telerik:RadBinaryImage Style="cursor: pointer; display: block;" runat="server" ID="RadBinaryImage1"
                                                    DataValue='<%#Eval("ImageByte") %>' Height='<%#ImageHeight %>' Width="<%#ImageWidth %>"
                                                    ResizeMode="Fit" onclick="<%#CreateWindowScript( Container.DataItem) %>" AlternateText="Click to view larger image"
                                                    ToolTip="Click to view larger image" />
                                            <asp:Label ID="Label1" runat="server" Text='<%#Bind("Name") %>' CssClass="txt" Width="100px" Height="50px"></asp:Label>

                                            </div>
                                        </AlternatingItemTemplate>
                                    </telerik:RadListView>
                                    </telerik:RadAjaxPanel>
                                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" ></telerik:RadAjaxLoadingPanel>
                                </ContentTemplate>
                            </telerik:RadDock>
                        </telerik:RadDockZone>
                    </div>
                </td>
            </tr>
        </table>
    </telerik:RadDockLayout>
</asp:Content>
